OBJ obj_name "description": [class_name] := {: value <- [data] :};
"obj_name" is the name of the object
"description" is a string expression
"class_name" is the class
"data" is the value assigned to the object; the syntax depends on the class of the object.
A class object is an instance of a class. An object binds the different parts of a class structure to concrete values.
Example:
TYPE PhysicalQuantityType "The type of any physical quantity" =
RECORD
{
Quantity : QuantityType;
Unit : UnitType;
Value : Real;
};
CLASS Time "A class for time"
SPECIALISES PhysicalQuantityType :=
{:
Quantity <- "Time";
Unit <- "d";
:};
OBJ TimeObject "Time object": Time :=
{:
Value <- 12458;
:}